<%-- Copyright (c) 2002 BroadVision, Inc. All rights reserved              --%>
<%-- The product described in this manual may be protected by one or more  --%>
<%-- U.S. and International patents. The BroadVision One-To-One software   --%>
<%-- is covered by U.S. patent 5,710,887.                                  --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and the BroadVision logo are registered       --%>
<%-- trademarks, and BroadVision One-To-One is a trademark of BroadVision, --%>
<%-- Inc. IONA and Orbix are trademarks of IONA Technologies, Ltd. RSA,    --%>
<%-- MD5, and RC2 are trademarks of RSA Data Security, Inc. All other      --%>
<%-- trademarks, service marks, and trade names belong to their respective --%>
<%-- owners. BroadVision, Inc. disclaims any proprietary interest in the   --%>
<%-- marks and names of others.                                            --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/bv-html.tld" prefix="bvhtml" %>

<script language="javascript" src="<%=request.getContextPath()%>/mc/js/date.js"></script>


<SCRIPT>
// function to POST data to a ".do"
function doAction(action, myform)
{
    myform.action='<html:rewrite page="'+action+'" />';
    myform.submit();
    return true;
}


function confirmDelete(){
  return confirm("<bean:message bundle="em" key="emarketing.ruleSet.ruleSetSummaryView.javaScript.alert.deleteOffer"/>");
}
</SCRIPT>


<table width="100%" border="0" cellspacing="0" cellpadding="0"
	class="zoneFive">
	<html:form action="/em/ruleset/ruleSetCreate.do">
              <html:hidden name="emRuleSetForm" property="oid" />
	<tr>
	<td valign="top" width="100%">
		<div class="pageTitle">
      		<bean:message bundle="em" key="emarketing.ruleSet.ruleSetSummaryView.pageTitle"/>:
        		<bean:write name="emRuleSetForm" property="name" />
		</div>
                <div class="errorMessage"><html:errors/></div>
		<div><%@include file="/mc/common/pagetab.jsp"%></div>

		<div class="pageSubtitle">
			<span class="left">
				<bean:message bundle="em" key="emarketing.ruleSet.ruleSetSummaryView.header"/>
			</span>
			<span class="Right">
			<logic:equal name="emRuleSetForm" property="editType" value="true">
				<input type="button"  name="editMktOffer"
			                              value="<bean:message bundle="em" key="button.edit"/>"
			                              class="inputButton"
			                              onClick="doAction('/em/ruleset/ruleSetEdit.do', this.form)">
			</logic:equal>
			<logic:equal name="emRuleSetForm" property="deleteType" value="true">
			        <input type="button"  name="deleteMktOffer"
			                              value="<bean:message bundle="em" key="emarketing.ruleSet.ruleSetSummaryView.button.deleteOffer"/>"
			                              class="inputButton"
			                          onClick="if (confirmDelete()) doAction('/em/ruleset/ruleSetDelete.do', this.form);">
			</logic:equal>
			</span>

            	</div>

        	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="labelForm" summary="Rule set information">
			<tr>
		            <td valign="top" class="label" width="30%">
				<bean:message bundle="em" key="emarketing.ruleset.ruleSetSearch.lable.ruleSetName"/>:
				</td>
           			<td valign="top" wrap class="labelField" width="70%">
                    	<bean:write  name="emRuleSetForm" property="name"/>
            		</td>
        		</tr>
        		<tr>
            		<td valign="top" class="label" width="30%">
				<bean:message bundle="em" key="emarketing.ruleSet.ruleSetSummary.lable.offerContentType"/>:
				</td>
            		<td valign="top" wrap class="labelField" width="70%">
               		<bean:write name="emRuleSetForm" property="contentTypeName"/>
           			</td>
        		</tr>
        		<tr>
            		<td valign="top"  class="label" width="30%" >
                		<bean:message bundle="em" key="emarketing.ruleset.text.description"/>:
            		</td>
            		<td valign="top" wrap class="labelField" width="70%">
                    	<bean:write  name="emRuleSetForm" property="description"/>
            		</td>
        		</tr>
       		<tr>
				<td valign="top"  class="label" width="30%" >
                		<bean:message bundle="em" key="em.label.status"/>:
           			 </td>
             		<td valign="top" wrap class="labelField" width="70%">
				<logic:equal name="emRuleSetForm" property="status" value="1">
		     		<bean:message bundle="em" key="em.label.online"/>
            		</logic:equal>
            		<logic:equal name="emRuleSetForm" property="status" value="0">
		     		<bean:message bundle="em" key="em.label.offline"/>
            		</logic:equal>
				</td>
        		</tr>
        		<tr>
				<td valign="top"  class="label" width="30%" >
                		<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.lable.evaluationMethod"/>:
            		</td>
             		<td valign="top" wrap class="labelField" width="70%">
				<logic:equal name="emRuleSetForm" property="evalMethod" value="ALL">
		    		 <bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.lable.evaluateall"/>
            		</logic:equal>
            		<logic:equal name="emRuleSetForm" property="evalMethod" value="FIRST">
		     		<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.lable.evaluatefirst"/>
            		</logic:equal>
				</td>
       		 </tr>
	  		<tr>
            		<td valign="top"  class="label" width="30%">
                  	<bean:message bundle="em" key="emarketing.ruleset.text.lastModified"/>:
            		</td>
            		<td valign="top"  class="labelField" width="70%">
                		<bean:write name="emRuleSetForm" property="lastModifiedDate" bundle="em"  formatKey="format.datetime.long"/>
            		</td>
        		</tr>




			<logic:equal name="emRuleSetForm" property="defaultAction" value="0">
			<tr>
				<td valign="top"  class="label" width="30%">
                  	<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.header.defaultAction" />:
            		</td>
				<td class="labelField" width="70%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.radio.value.doNothing" />
				</td>
			</tr>
			</logic:equal>
			<logic:equal name="emRuleSetForm" property="defaultAction" value="1">
			<tr>
				<td class="label" width="30%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.header.defaultAction" />:
				</td>
				<td class="labelField" width="70%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.radio.value.pickOneItem" />
				</td>
			</tr>
			<tr>
				<td class="label" width="30%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetView.lable.itemKey" />:
				</td>
				<td class="labelField" width="70%">

					<bean:write name="emRuleSetForm" property="itemKey" />
				</td>
			</tr>
			</logic:equal>
			<logic:equal name="emRuleSetForm" property="defaultAction" value="2">
			<tr>
				<td class="label" width="30%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.header.defaultAction" />:
				</td>
				<td class="labelField" width="70%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.radio.value.pickCategory" />
				</td>
			</tr>
			<tr>
				<td class="label" width="30%">
					<bean:message bundle="em" key="emarketing.ruleset.ruleSetEdit.lable.itemsFound" />:
				</td>
				<td class="labelField" width="70%">
					<bean:write name="emRuleSetForm" property="categoryPath" />
					<logic:equal name="emRuleSetForm" property="includeSubCategory" value="true">
						<bean:message bundle="em" key="emarketing.ruleset.text.includeSubCategories" />
					</logic:equal>
				</td>
			</tr>
			<tr>
				<td class="label" width="30%">
					<bean:message bundle="em" key="emarketing.ruleset.text.numContents" />:
				</td>
				<td class="labelField" width="70%">
					<bean:write name="emRuleSetForm" property="numItems" />
				</td>
			</tr>

			</logic:equal>
		</table>

    	</td>
    	</tr>
    	</html:form>

    </table>
